Using the DataTable Functions

From version 7.2, the Real-Time Designer includes functions for working with DataTables, such as functions to add or delete columns and rows, and functions to import data from an external source and execute functions on the DataTable. In version 7.3, the Copy DataTable, Delete All Rows, Import from XML, and Export to XML functions were added.

For details on each of the DataTable functions, see DataTable Library Object. For details on using DataTable function with Excel and JSON, see Using the DataTable Functions with Excel and JSON.

The DataTable object does not support tables with merged cells.

To test the DataTable functions:

  1. Download the sample project here. The ZIP file includes the sample Real-Time Designer project, as well as an XML file, Sample_xml, which you can use to test the Import XML to DataTable function.

  2. Copy the XML file to C:\TEMP.

  3. Run the Real-Time Designer project, which includes a callout that you can use to test the functions.

  4. To view the syntax of a function before you test it, in the Callout Editor, right-click the function link in the callout, and select Replace > Action link.

    The Action Link window appears, showing the function syntax. For example, if you right-click the Add Rows function link, the following function syntax appears:

  5. Run the project. A Quick callout appears.

  6. Click Quick to open the callout.

  7. Open the Monitor.

  8. Select Business Entities. In the Properties tab you can view the status of the DataTables, which are all initially empty.

  9. Test the functions. For example, in the callout, click Add Columns.

    Five columns are added to DataTable -1.

  10. Click Add Rows.

    Four rows of data are added to DataTable -1.